home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sources / emacs / buildl.dz < prev    next >
Text File  |  1994-10-02  |  3KB  |  71 lines

  1. #!/bin/sh
  2. # uncomment the next line to see more of the build process
  3. #set -x
  4. # BUILD script provided by Ready-to-Run Software, Inc.
  5. # Copyright 1994 Ready-to-Run Software, Inc. All Rights Reserved.
  6. BUILDDIR=`pwd`
  7. SOURCEDIR=${SOURCEDIR-/cdrom/SOURCES}
  8. if test ! -d $SOURCEDIR ; then 
  9.    cd `dirname $0`/..; SOURCEDIR=`pwd`
  10.    echo Assuming SOURCEDIR is $SOURCEDIR
  11.    cd $BUILDDIR
  12. fi
  13. INSTALLDIR=${INSTALLDIR-/usr/local}
  14. INSTALLSHAREDIR=${INSTALLSHAREDIR-/usr/local/share}
  15. if test "$1" != ""; then 
  16.    MACHINE=$1
  17. fi
  18. if test "$MACHINE" = ""; then 
  19.    MACHINE=`$SOURCEDIR/../common/guess. `
  20.    echo "Assuming machine is $MACHINE"
  21. fi
  22. machine=$MACHINE
  23. echo Ignore any errors about directories already existing
  24. mkdir emacs
  25. mkdir -p $INSTALLDIR
  26. mkdir $INSTALLDIR/bin
  27. mkdir $INSTALLDIR/lib
  28. mkdir -p $INSTALLSHAREDIR
  29. mkdir $INSTALLSHAREDIR/man
  30. mkdir $INSTALLSHAREDIR/man/man1
  31. mkdir $INSTALLSHAREDIR/doc
  32. mkdir $INSTALLSHAREDIR/${SHAREPREFIX}bin
  33. mkdir $INSTALLSHAREDIR/${SHAREPREFIX}lib
  34. /bin/rm -f $BUILDDIR/zcat
  35. /bin/ln -s $SOURCEDIR/../$machine/bin/zcat. $BUILDDIR/zcat
  36.  
  37. cd $BUILDDIR/emacs
  38. cat $SOURCEDIR/emacs/emac1922.gz | $BUILDDIR/zcat -d -c | tar xvf -
  39. cd emacs-19.22
  40. (sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/emacs/rtr/emacs. | patch   -s -p )
  41. test -f  $SOURCEDIR/emacs/$machine/emacs. &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/emacs/$machine/emacs. | patch -b .rtr -s -p )
  42. case ${MACHINE} in
  43. sun4c) configure --with-x-toolkit -prefix=$INSTALLDIR \
  44. --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib sparc-sun-sunos4
  45. ;;
  46. ssol2) configure --with-x-toolkit -prefix=$INSTALLDIR \
  47. --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib sparc-sun-solaris2
  48. ;;
  49. alpha) configure --with-x-toolkit -prefix=$INSTALLDIR \
  50. --with-gcc=no alpha-dec-osf1
  51. ;;
  52. sun3) configure -prefix=$INSTALLDIR \
  53. --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib m68k-sun-sunos4
  54. ;;
  55. *)     configure --with-x-toolkit -prefix=$INSTALLDIR
  56. esac
  57. make
  58. if test "$RM" != "" ; then make install ; fi
  59. rm $INSTALLDIR/bin/emacs
  60. ''ln $INSTALLDIR/bin/emacs-19.22 $INSTALLDIR/bin/emacs
  61.  
  62. rm $INSTALLSHAREDIR/${SHAREPREFIX}lib/emacs/19.22/etc/DOC-19.22.1
  63. ''ln $INSTALLSHAREDIR/${SHAREPREFIX}lib/emacs/19.22/etc/DOC $INSTALLSHAREDIR/${SHAREPREFIX}lib/emacs/19.22/etc/DOC-19.22.1
  64. find $INSTALLDIR/* -name \*.orig -exec rm -f {} \;
  65. if test ${MACHINE} = "rs6000"; then
  66. else
  67. fi
  68. cd ..
  69. cd $BUILDDIR
  70. if test "$RM" != "" ; then rm -rf $BUILDDIR/emacs ; fi
  71.